home *** CD-ROM | disk | FTP | other *** search
/ Enter 2006 February / enter-2006-02.iso / files / Illustrator_CS2_ue_TryOut.exe / bridge / Adobe Bridge 1.0.msi / Data1.cab / _5menus.jsx < prev    next >
Encoding:
Text File  |  2005-03-24  |  18.4 KB  |  624 lines

  1. /**************************************************************************
  2. *
  3. *  @@@BUILDINFO@@@ 05menus.jsx 1.0.0.48 07-Feb-2005
  4. *  Copyright 2005 Adobe Systems Incorporated
  5. *  All Rights Reserved.
  6. *
  7. * NOTICE:  All information contained herein is, and remains the property of
  8. * Adobe Systems Incorporated  and its suppliers,  if any.  The intellectual 
  9. * and technical concepts contained herein are proprietary to  Adobe Systems 
  10. * Incorporated  and its suppliers  and may be  covered by U.S.  and Foreign 
  11. * Patents,patents in process,and are protected by trade secret or copyright 
  12. * law.  Dissemination of this  information or reproduction of this material
  13. * is strictly  forbidden  unless prior written permission is  obtained from 
  14. * Adobe Systems Incorporated.
  15. **************************************************************************/
  16.  
  17. /////////////////////////////////////////////////////////
  18.  
  19. // The Recent Files menu
  20. // This menu holds as many as 9 entries. The entries are part of the pref object's
  21. // recentFiles array. The menu needs to be set up as the number of entries grow.
  22.  
  23. fileMenu                = MenuElement.find ("file");
  24. fileMenu.recentFiles    = new MenuElement ("menu", "$$$/ESToolkit/Menu/File/Recent=Recent &Files",
  25.                                            "after file/open", "file/recent");
  26.  
  27. fileMenu.recentFiles.onDisplay = function()
  28. {
  29.     var index = 1;
  30.     for (var i = 0; i < prefs.recentFiles.length; i++)
  31.     {
  32.         var f = new File (prefs.recentFiles [i]);
  33.         if (f.exists)
  34.         {
  35.             var cmdID = "menu/file/recent" + index;
  36.             var text = "";
  37.             if ($.os.indexOf ("Win" >= 0))
  38.                 // Windows: start with an index
  39.                 text = "&" + index + " ";
  40.             text += decodeURIComponent (f.name);
  41.             var element = MenuElement.find (cmdID);
  42.             if (!element)
  43.                 element = new MenuElement ("command", text, "at the end of file/recent", cmdID);
  44.             else
  45.                 element.text = text;
  46.             element.file = f;
  47.             element.index = i;
  48.             element.enabled = true;
  49.             element.onSelect = function()
  50.             {
  51.                 // Move the entry to the top
  52.                 text = prefs.recentFiles [this.index];
  53.                 prefs.recentFiles.splice (this.index, 1);
  54.                 prefs.recentFiles.splice (0, 0, text);
  55.                 Document.create (this.file);
  56.             }
  57.             index++;
  58.         }
  59.     }
  60.     this.enabled = (prefs.recentFiles.length > 0);
  61. }
  62.  
  63. /////////////////////////////////////////////////////////////////////////
  64. // Set up the Edit menu. The Preferences item is on the App menu on the Mac.
  65.  
  66. var editMenu            = MenuElement.find ("edit");
  67. editMenu.lines            = MenuElement.find ("edit/lines");
  68. editMenu.hilite            = MenuElement.find ("edit/hilite");
  69. editMenu.check            = MenuElement.find ("edit/check");
  70. editMenu.findReplace    = MenuElement.find ("edit/findReplace");
  71. editMenu.findNext        = MenuElement.find ("edit/findNext");
  72. editMenu.preferences    = MenuElement.find ("tools/preferences");
  73.  
  74. editMenu.lines.enabled =
  75. editMenu.hilite.enabled =
  76. editMenu.check.enabled = true;
  77. if (editMenu.preferences) editMenu.preferences.enabled = true;
  78.  
  79. editMenu.findReplace.onDisplay = function()
  80. {
  81.     this.enabled = (document != null);
  82. }
  83.  
  84. editMenu.lines.onSelect = function()
  85. {
  86.     this.checked = !this.checked;
  87.     prefs.lineNumbers = this.checked;
  88.     return true;
  89. }
  90.  
  91. editMenu.hilite.onSelect = function()
  92. {
  93.     this.checked = !this.checked;
  94.     prefs.hilite = this.checked;
  95.     return true;
  96. }
  97.  
  98. editMenu.check.onSelect = function()
  99. {
  100.     if (document != null)
  101.     {
  102.         // check the syntax and display the result in the status line
  103.         var result = document.checkSyntax (app.includePath);
  104.         if (result != true)
  105.         {
  106.             window.statusLine = result;
  107.             app.beep();
  108.         }
  109.         else
  110.             window.statusLine = localize ("$$$/ESToolkit/Alerts/SyntaxOK=No syntax errors");
  111.     }
  112.     return true;
  113. }
  114.  
  115. //////////////////////////////////////////////////////////////////////////
  116. // The Debug menu.
  117.  
  118. var debugMenu            = MenuElement.find ("debug");
  119. debugMenu.run            = MenuElement.find ("debug/run");
  120. debugMenu.stop            = MenuElement.find ("debug/stop");
  121. debugMenu.pause            = MenuElement.find ("debug/break");
  122. debugMenu.into            = MenuElement.find ("debug/into");
  123. debugMenu.over            = MenuElement.find ("debug/over");
  124. debugMenu.out            = MenuElement.find ("debug/out");
  125. debugMenu.bptoggle        = MenuElement.find ("debug/bptoggle");
  126. debugMenu.bpclearall    = MenuElement.find ("debug/bpclearall");
  127. debugMenu.noErrors        = new MenuElement ("command", "$$$/ESToolkit/Menu/Debug/DontBreakOnErrors=Don't Break On Guarded &Exceptions", 
  128.                                             "--at the end of debug", "debug/noerrors");
  129.  
  130. // Disable the Debug menu altogether
  131.  
  132. debugMenu.disable = function()
  133. {
  134.     this.run.enabled        =
  135.     this.into.enabled        =
  136.     this.over.enabled        =
  137.     this.out.enabled        =
  138.     this.bptoggle.enabled    =
  139.     this.bpclearall.enabled    =
  140.     this.stop.enabled        =
  141.     this.pause.enabled        = 
  142.     this.noErrors.enabled = false;
  143. }
  144.  
  145. // Set the state of the debugging options according to the document settings
  146.  
  147. debugMenu.reflectState = function()
  148. {
  149.     // the current debugger may not yet have been created in the startup phase
  150.     if (!document || !currentDebugger)
  151.         this.disable();
  152.     else 
  153.     {
  154.         var running = (currentDebugger.state == Debugger.RUNNING);
  155.         var stopped = (currentDebugger.state == Debugger.STOPPED);
  156.         var waiting = (currentDebugger.state == Debugger.WAITING);
  157.         switch (document.status)
  158.         {
  159.             case "noexec":
  160.                 // not executable
  161.                 this.disable();
  162.                 break;
  163.             case "exec":
  164.                 // standard executable
  165.                 this.run.enabled        =
  166.                 this.into.enabled        =
  167.                 this.over.enabled        = !running || stopped;
  168.                 this.out.enabled        = stopped;
  169.                 this.bptoggle.enabled    =
  170.                 this.bpclearall.enabled    = true;
  171.                 this.stop.enabled        = running || stopped;
  172.                 this.pause.enabled        = running;
  173.                 break;
  174.             case "dynamic":
  175.                 // dynamic script, not saveable
  176.                 this.run.enabled        =
  177.                 this.into.enabled        =
  178.                 this.over.enabled        =
  179.                 this.out.enabled        =
  180.                 this.bptoggle.enabled    =
  181.                 this.bpclearall.enabled    =
  182.                 this.stop.enabled        = stopped;
  183.                 this.pause.enabled        = false;
  184.                 break;
  185.         }
  186.     }
  187. }
  188.  
  189. debugMenu.run.onSelect = function()
  190. {
  191.     if (currentDebugger.state == Debugger.STOPPED)
  192.         currentDebugger.doContinue();
  193.     else if (document)
  194.         currentDebugger.start (document, 1);
  195. }
  196.  
  197. debugMenu.into.onSelect = function()
  198. {
  199.     if (currentDebugger.state == Debugger.STOPPED)
  200.         currentDebugger.execute ("StepInto");
  201.     else if (document)
  202.         currentDebugger.start (document, 2);
  203. }
  204.  
  205. debugMenu.over.onSelect = function()
  206. {
  207.     if (currentDebugger.state == Debugger.STOPPED)
  208.         currentDebugger.execute ("StepOver");
  209.     else if (document)
  210.         currentDebugger.start (document, 2);
  211. }
  212.  
  213. debugMenu.out.onSelect = function()
  214. {
  215.     if (currentDebugger.state == Debugger.STOPPED)
  216.         currentDebugger.execute ("StepOut");
  217. }
  218.  
  219. debugMenu.pause.onSelect = function()
  220. {
  221.     if (currentDebugger.isActive())
  222.     {
  223.         currentDebugger.execute ("Stop");
  224.         debugMenu.reflectState();
  225.     }
  226. }
  227.  
  228. debugMenu.stop.onSelect = function()
  229. {
  230.     if (currentDebugger.isActive())
  231.     {
  232.         currentDebugger.execute ("Halt");
  233.         debugMenu.reflectState();
  234.     }
  235. }
  236.  
  237. debugMenu.bptoggle.onDisplay = 
  238. debugMenu.bpclearall.onDisplay = function()
  239. {
  240.     this.enabled = (document != null);
  241. }
  242.  
  243. debugMenu.bptoggle.onSelect = function()
  244. {
  245.     var at = document.getSelection()[0];
  246.     document.toggleBP (document.offsetToLine (at));
  247. }
  248.  
  249. debugMenu.bpclearall.onSelect = function()
  250. {
  251.     document.clearAllBP();
  252. }
  253.  
  254. debugMenu.noErrors.onDisplay = function()
  255. {
  256.     this.checked = prefs.dontBreakOnErrors;
  257. }
  258.  
  259. debugMenu.noErrors.onSelect = function()
  260. {
  261.     prefs.dontBreakOnErrors = !prefs.dontBreakOnErrors;
  262. }
  263.  
  264. //////////////////////////////////////////////////////////////////////////
  265. // The Profile menu.
  266. // Profile display mode: 0 - nothing, 1 - hits, 2 - time
  267. // Profiling level:
  268. // 0 - no profiling (default)
  269. // 1 - function level profiling
  270. // 2 - function level profiling with timing information
  271. // 3 - line level profiling
  272. // 4 - line level profiling with timing information.
  273.  
  274. var profileMenu            = new MenuElement ("menu", "$$$/ESToolkit/Menu/Profile=&Profile",
  275.                                            "after debug", "profile");
  276. profileMenu.off            = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/Off=&Off",
  277.                                            "at the end of profile", "profile/off");
  278. profileMenu.functions    = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/Functions=&Functions",
  279.                                            "at the end of profile", "profile/functions");
  280. profileMenu.lines        = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/Lines=&Lines",
  281.                                            "at the end of profile", "profile/lines");
  282. profileMenu.timing        = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/Timing=&Add Timing Info",
  283.                                            "----at the end of profile", "profile/timing");
  284. profileMenu.none        = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/None=&No Profiler Data",
  285.                                            "----at the end of profile", "profile/none");
  286. profileMenu.hits        = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/Hits=Show &Hit Count",
  287.                                            "at the end of profile", "profile/hits");
  288. profileMenu.time        = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/Time=Show &Timing",
  289.                                            "at the end of profile", "profile/time");
  290. profileMenu.clear        = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/Clear=&Erase Profiler Data",
  291.                                            "----at the end of profile", "profile/clear");
  292. profileMenu.save        = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/SaveAs=Save Profiler Data &As...",
  293.                                            "----at the end of profile", "profile/save");
  294.  
  295. profileMenu.off.onDisplay = function()
  296. {
  297.     this.checked = (prefs.profileLevel == 0);
  298. }
  299.  
  300. profileMenu.off.onSelect = function()
  301. {
  302.     profileMenu.setLevel (0);
  303. }
  304.  
  305. profileMenu.functions.onDisplay = function()
  306. {
  307.     this.checked = (prefs.profileLevel == 1 || prefs.profileLevel == 2);
  308. }
  309.  
  310. profileMenu.functions.onSelect = function()
  311. {
  312.     profileMenu.setLevel (prefs.profileTiming ? 2 : 1);
  313.     documents.setProfDisplayMode (prefs.profDisplayMode);
  314. }
  315.  
  316. profileMenu.lines.onDisplay = function()
  317. {
  318.     this.checked = (prefs.profileLevel == 3 || prefs.profileLevel == 4);
  319. }
  320.  
  321. profileMenu.lines.onSelect = function()
  322. {
  323.     profileMenu.setLevel (prefs.profileTiming ? 4 : 3);
  324.     documents.setProfDisplayMode (prefs.profDisplayMode);
  325. }
  326.  
  327. profileMenu.timing.onDisplay = function()
  328. {
  329.     this.enabled = (prefs.profileLevel != 0);
  330.     this.checked = (prefs.profileLevel == 2 || prefs.profileLevel == 4);
  331. }
  332.  
  333. profileMenu.timing.onSelect = function()
  334. {
  335.     prefs.profileTiming = !prefs.profileTiming;
  336.     if (prefs.profileLevel)
  337.     {
  338.         if (prefs.profileTiming)
  339.             profileMenu.setLevel (prefs.profileLevel == 1 ? 2 : 4);
  340.         else
  341.         {
  342.             profileMenu.setLevel (prefs.profileLevel == 2 ? 1 : 3);
  343.             // reset display mode to Hit Count if Times was selected
  344.             if (prefs.profDisplayMode == 2)
  345.             {
  346.                 prefs.profDisplayMode = 1;
  347.                 documents.setProfDisplayMode (1);
  348.             }
  349.         }
  350.     }
  351. }
  352.  
  353. profileMenu.none.onDisplay = function()
  354. {
  355.     this.enabled = (prefs.profileLevel != 0);
  356.     this.checked = (prefs.profDisplayMode == 0);
  357. }
  358.  
  359. profileMenu.none.onSelect = function()
  360. {
  361.     prefs.profDisplayMode = 0;
  362.     documents.setProfDisplayMode (0);
  363. }
  364.  
  365. profileMenu.hits.onDisplay = function()
  366. {
  367.     this.enabled = (prefs.profileLevel != 0);
  368.     this.checked = (prefs.profDisplayMode == 1);
  369. }
  370.  
  371. profileMenu.hits.onSelect = function()
  372. {
  373.     prefs.profDisplayMode = 1;
  374.     documents.setProfDisplayMode (1);
  375. }
  376.  
  377. profileMenu.time.onDisplay = function()
  378. {
  379.     this.enabled = prefs.profileTiming;
  380.     this.checked = (prefs.profDisplayMode == 2);
  381. }
  382.  
  383. profileMenu.time.onSelect = function()
  384. {
  385.     prefs.profDisplayMode = 2;
  386.     documents.setProfDisplayMode (2);
  387. }
  388.  
  389. profileMenu.clear.enabled = true;
  390.  
  391. profileMenu.clear.onSelect = function()
  392. {
  393.     documents.clearProfData();
  394. }
  395.  
  396. profileMenu.save.onDisplay = function()
  397. {
  398.     this.enabled = (prefs.profileLevel > 0);
  399. }
  400.  
  401. profileMenu.save.onSelect = function()
  402. {
  403.     documents.saveProfData();
  404. }
  405.  
  406. profileMenu.setLevel = function (level)
  407. {
  408.     prefs.profileLevel = level;
  409.     if (currentDebugger.state == Debugger.STOPPED)
  410.         currentDebugger.profileLevel = level;
  411. }
  412.  
  413. //////////////////////////////////////////////////////////////////////////
  414. // The Window menu
  415.  
  416. var windowMenu = MenuElement.find ("window");
  417. windowMenu.showAll = new MenuElement ("command",
  418.                                       "$$$/ESToolkit/Menu/Window/ShowAll=&Show All",
  419.                                       "before window/1---", "window/showAll");
  420.  
  421. windowMenu.showAll.enabled = true;
  422.  
  423. windowMenu.showAll.onSelect = function()
  424. {
  425.     var i;
  426.     for (i = 0; i < window.panes.length; i++)
  427.         window.panes [i].visible = true;
  428.     for (i = 0; i < documents.length; i++)
  429.         documents [i].visible = true;
  430. }
  431.  
  432.  
  433. //////////////////////////////////////////////////////////////////////////
  434. // The context menu for the Variables pane
  435.  
  436. var variablesContextMenu = {};
  437.  
  438. variablesContextMenu.functions = new MenuElement ("command", 
  439.                                                   "$$$/ESToolkit/Menu/Variables/Functions=Show Global &Functions",
  440.                                                   "----at the end of variables", "variables/functions");
  441. variablesContextMenu.methods = new MenuElement ("command", 
  442.                                                   "$$$/ESToolkit/Menu/Variables/Methods=Show Object &Methods",
  443.                                                   "at the end of variables", "variables/methods");
  444. variablesContextMenu.predefined   = new MenuElement ("command", 
  445.                                                   "$$$/ESToolkit/Menu/Variables/Predefined=Show &JavaScript Language Elements",
  446.                                                   "at the end of variables", "variables/predefined");
  447.  
  448. variablesContextMenu.functions.enabled  =
  449. variablesContextMenu.methods.enabled  =
  450. variablesContextMenu.predefined.enabled = true;
  451.  
  452. variablesContextMenu.functions.onDisplay = function()
  453. {
  454.     this.checked = prefs.showFunctions;
  455. }
  456.  
  457. variablesContextMenu.methods.onDisplay = function()
  458. {
  459.     this.checked = prefs.showMethods;
  460. }
  461.  
  462. variablesContextMenu.predefined.onDisplay = function()
  463. {
  464.     this.checked = prefs.showPredefined;
  465. }
  466.  
  467. variablesContextMenu.functions.onSelect = function()
  468. {
  469.     prefs.showFunctions = !prefs.showFunctions;
  470.     window.variables.refresh();
  471. }
  472.  
  473. variablesContextMenu.methods.onSelect = function()
  474. {
  475.     prefs.showMethods = !prefs.showMethods;
  476.     window.variables.refresh();
  477. }
  478.  
  479. variablesContextMenu.predefined.onSelect = function()
  480. {
  481.     prefs.showPredefined = !prefs.showPredefined;
  482.     window.variables.refresh();
  483. }
  484.  
  485. //////////////////////////////////////////////////////////////////////////
  486. // The context menu for the Editor
  487.  
  488. var editContextMenu = {}
  489.  
  490. editContextMenu.none        = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/None=&No Profiler Data",
  491.                                                "----at the end of context/document", "context/document/none");
  492. editContextMenu.hits        = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/Hits=Show &Hit Count",
  493.                                                "at the end of context/document", "context/document/hits");
  494. editContextMenu.time        = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/Time=Show &Timing",
  495.                                                "at the end of context/document", "context/document/time");
  496. editContextMenu.clear        = new MenuElement ("command", "$$$/ESToolkit/Menu/Profile/Clear=&Erase Profiler Data",
  497.                                                "at the end of context/document", "context/document/clear");
  498.  
  499. //editContextMenu.check.enabled =
  500. editContextMenu.none.enabled =
  501. editContextMenu.hits.enabled =
  502. editContextMenu.time.enabled =
  503. editContextMenu.clear.enabled = true;
  504.  
  505. editContextMenu.none.onDisplay = function()
  506. {
  507.     this.checked = (document.profileDisplayMode == 0);
  508. }
  509.  
  510. editContextMenu.none.onSelect = function()
  511. {
  512.     document.profileDisplayMode = 0;
  513. }
  514.  
  515. editContextMenu.hits.onDisplay = function()
  516. {
  517.     this.checked = (document.profileDisplayMode == 1);
  518. }
  519.  
  520. editContextMenu.hits.onSelect = function()
  521. {
  522.     document.profileDisplayMode = 1;
  523. }
  524.  
  525. editContextMenu.time.onDisplay = function()
  526. {
  527.     this.enabled = prefs.profileTiming;
  528.     this.checked = (document.profileDisplayMode == 2);
  529. }
  530.  
  531. editContextMenu.time.onSelect = function()
  532. {
  533.     document.profileDisplayMode = 2;
  534. }
  535.  
  536. editContextMenu.clear.enabled = true;
  537.  
  538. editContextMenu.clear.onSelect = function()
  539. {
  540.     document.clearProfData();
  541. }
  542.  
  543. /////////////////////////////////////////////////////////
  544. // The Editor Line Numbers contextual menu
  545.  
  546. var editLineContextMenu = MenuElement.find ("context/doclines");
  547. editLineContextMenu.bptoggle    = new MenuElement ("command", 
  548.                                                 "$$$/ESToolkit/Menu/Debug/ToggleBP=To&ggle Breakpoint",
  549.                                                 "---at the end of context/doclines", "context/doclines/bptoggle");
  550. editLineContextMenu.bpedit        = new MenuElement ("command", 
  551.                                                 "$$$/ESToolkit/Menu/Debug/EditBP=&Edit Breakpoint...",
  552.                                                 "at the end of context/doclines", "context/doclines/bpedit");
  553. editLineContextMenu.bpclearall    = new MenuElement ("command", 
  554.                                                 "$$$/ESToolkit/Menu/Debug/ClearAllBP=&Clear All Breakpoints",
  555.                                                 "---at the end of context/doclines", "context/doclines/bpclearall");
  556. editLineContextMenu.nextStatement= new MenuElement ("command", "$$$/ESToolkit/Menu/Debug/NextStatement=Show Next Statement",
  557.                                                "---at the end of context/doclines", "context/doclines/nextStatement");
  558. editLineContextMenu.stopHere    = new MenuElement ("command", 
  559.                                                 "$$$/ESToolkit/Menu/Debug/RunToThisLine=Run To This &Line",
  560.                                                 "at the end of context/doclines", "context/doclines/stophere");
  561.  
  562. editLineContextMenu.stopHere.onDisplay = function()
  563. {
  564.     this.enabled = debugMenu.run.enabled;
  565. }
  566.  
  567. editLineContextMenu.nextStatement.onDisplay = function()
  568. {
  569.     this.enabled = currentDebugger.state == Debugger.STOPPED;
  570. }
  571.  
  572. editLineContextMenu.bpedit.onDisplay =
  573. editLineContextMenu.bptoggle.onDisplay = 
  574. editLineContextMenu.bpclearall.onDisplay = function()
  575. {
  576.     this.enabled = (document != null);
  577. }
  578.  
  579. editLineContextMenu.nextStatement.onSelect = function()
  580. {
  581.     currentDebugger.showNextStatement();
  582. }
  583.  
  584. editLineContextMenu.stopHere.onSelect = function()
  585. {
  586.     var line = document.rightClickLine;
  587.     document.tempBP = line;
  588.     debugMenu.run.onSelect();
  589. }
  590.  
  591. editLineContextMenu.bpedit.onSelect = function()
  592. {
  593.     var line = document.rightClickLine;
  594.     if (!document.isBP (line))
  595.         document.toggleBP (line);
  596.     window.breakpoints.editBP (line);
  597. }
  598.  
  599. editLineContextMenu.bptoggle.onSelect = function()
  600. {
  601.     document.toggleBP (document.rightClickLine);
  602. }
  603.  
  604. editLineContextMenu.bpclearall.onSelect = function()
  605. {
  606.     document.clearAllBP();
  607. }
  608.  
  609. /////////////////////////////////////////////////////////
  610.  
  611. // Additions to the Scripts context menu
  612.  
  613. var scriptsContextMenu = MenuElement.find ("context/scripts");
  614. scriptsContextMenu.refresh = new MenuElement("command", "$$$/ESToolkit/ContextMenu/Scripts/Refresh=&Refresh",
  615.                                              "----at the end of context/scripts", "context/scripts/refresh");
  616.  
  617. scriptsContextMenu.refresh.enabled = true;
  618.  
  619. scriptsContextMenu.refresh.onSelect = function()
  620. {
  621.     window.scripts.getScripts();
  622. }
  623.  
  624.